
#include "gkt_image.h"

#if GKT_IMAGE_ENABLE

typedef struct {
	const gkt_image_attr_s	*attr_table;
	uint32_t	table_size;
} image_manager_s;
static image_manager_s s_image_manager;

void gkt_image_set_attrs(
			const gkt_image_attr_s *attr_table,
			uint32_t table_size)
{
	if (attr_table && (table_size > 0)) {
		s_image_manager.attr_table = attr_table;
		s_image_manager.table_size = table_size;
	}
}

const gkt_image_attr_s *gkt_image_get_attr(uint32_t id)
{
	return (id < s_image_manager.table_size) ?
				&s_image_manager.attr_table[id] : (const gkt_image_attr_s *)id;
}

#endif

